package icu.wdtt.service;


import icu.wdtt.exception.FilesException;
import icu.wdtt.model.Files;
import icu.wdtt.model.User;


import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;


import java.io.File;
import java.io.FileNotFoundException;

import java.util.List;
@Transactional
public interface FilesService {


    public Files get(int fid);

    public List<Files> getAll();

    public Boolean add(MultipartFile[] files, int uid) throws  Exception;

    public Boolean del(int fid);

    public Files download(int fid, int uid) throws FilesException;

    public List<Files> getByFname(String rname, User user);

    public List<Files> getByType(int uid,String ftype);

    List<Files> getMainFiles(int uid);

    public Boolean modifyFilesName(int fid , String fname) throws FilesException;
}
